﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="Adleft.ascx.cs" Inherits="Admin_admin_left" %>
<link href="<%=ResolveClientUrl("~/Admin/css/left.css")%> " rel="stylesheet" type="text/css" />

<script type="text/javascript">
    function showContent(divId) {

        var obj = document.getElementById("div" + divId);

        //判断当前的div状态，如果不是隐藏状态 则执行if中，否则就隐藏
        if (obj.style.display == "none") {
            //如果你需要添加项，请记得修改这里 for 循环的次数刚好符合div(显示答案的div) 的个数 
            //所有的div都先 hidden
            var n = $(".divfan_leftsider_info_nav").length;
            for (var i = 1; i <= n; i++) {
                document.getElementById("div" + i).style.display = "none";
                document.getElementById("img" + i).src = "<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>";
            }
            //再把当前需要显示的div给display 
            // obj.style.display = "block";
            $(obj).slideToggle("slow");
            document.getElementById("img" + divId).src = "<%=WebUtility.GetUrl("~/Admin/images/jianhao.jpg")%>";//"images/jianhao.jpg";
        }
        else {
            // obj.style.display = "none";
            $(obj).slideToggle("slow");
            document.getElementById("img" + divId).src = "<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>";
        }
    }
    function initAdLeft() {

        var fileUrl = getUrl(document.location.href).toLowerCase();

        $(".divfan_leftsider_menuContent").each(function () {
            var leftmenuid = $(this).attr("id").replace("div", "");
            $(this).find("a").each(function () {
                //console.log(leftmenuid + " " + $(this).attr("href").toLowerCase());
                if ($(this).attr("href").toLowerCase().indexOf(fileUrl) >= 0) {
                    showContent(leftmenuid);
                    return;
                }
            })
        })

        //var $alldivs = $("#adleft>div:odd");
        //var fileUrl = getUrl(document.location.href).toLowerCase() + "";;
        //for (var i = 0; i < $alldivs.length; i++) {
        //    var $div = $($alldivs[i]);
        //    var $alllinks = $div.find("a[href!=#]");

        //    for (var j = 0; j < $alllinks.length; j++) {
        //        var $link = $($alllinks[j]);
        //        var url = $link.attr("href");
        //        url = getUrl(url).toLowerCase();
        //        if (url == fileUrl) {
        //            showContent(i + 1);
        //            return;
        //        }
        //    }
        //}



    }

    $(function () {
        initAdLeft();
        var rightheight = $("#content").height();
        $("#leftToggler").css("height", rightheight + "px");
        var leftopen = handlecookie("leftopen");
        if (leftopen != null && leftopen == "0") {
            closeleft();
        }
    })

    ///关闭左边菜单
    function closeleft() {
        $("#divfan_leftsider").hide();
        $(".main-col").css("margin-left", 0 + "px").css("padding-left", 0 + "px");
        $("#leftToggler").show();
        ///cookie leftopen = 0表示关闭
        handlecookie("leftopen", 0 + "", { expires: 1, path: "/", secure: false });
    }

    ///打开左边菜单
    function showleft() {
        $("#divfan_leftsider").show();
        $(".main-col").css("margin-left", 160 + "px").css("padding-left", 25 + "px");
        $("#leftToggler").hide();
        ///cookie leftopen = 1表示开
        handlecookie("leftopen", 1 + "", { expires: 1, path: "/", secure: false });
    }

</script>

<div id="leftmain" class="closeLeft">
    <div class="divfan_leftsider" id="divfan_leftsider">
        <h3>系统管理<a href="javascript:void(0)" style="font-size: 12px; color: Red" class="leftred"
            onclick="closeleft()" title="关闭菜单">[关闭]</a></h3>
        <div class="divfan_leftsider_info" id="adleft">



            <div class="divfan_leftsider_info_nav" onclick="showContent('2')" id="left_head3">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img2" />订单管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div2" style="display: none">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>

                        <li class=" level2"><a href='<%=WebUtility.GetUrl("~/admin/Shop/OrderList.aspx")%>'
                            class=""><span>订单列表</span></a></li>

                        <li class=" level2"><a href='<%=WebUtility.GetUrl("~/admin/Shop/historyOrderList.aspx")%>'
                            class=""><span>历史订单</span></a></li>


                        <li class=" level2"><a href='/Admin/Service/OrderDelive.aspx'
                            class=""><span>订单调度</span></a></li>
                        <li class="  level2"><a href="<%=WebUtility.GetUrl("~/Admin/Shop/delOrders.aspx")%>"
                            id="A1"><span>订单回收站</span></a></li>
                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/orderlog.aspx")%>'
                            class=""><span>订单状态操作日志</span></a></li>

                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/orderoploglist.aspx")%>'
                            class=""><span>订单操作日志</span></a></li>

                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/ShopReviewList.aspx")%>'
                            class=""><span>订单评论</span></a></li>
                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/orderimport.aspx")%>'
                            class=""><span>订单导入</span></a></li>

                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/ordereleimport.aspx")%>'
                            class=""><span>平台对接</span></a></li>


                        <li class=" level2 "><a href='<%=WebUtility.GetUrl("~/admin/Shop/OrdereleList.aspx")%>'
                            class=""><span>平台管理</span></a></li>


                        <li class=" level2 last"><a href='<%=WebUtility.GetUrl("~/Admin/Service/fastaddorder.aspx")%>'
                            class=""><span>一键下单</span></a></li>


                        <li class=" level2 last"><a href='<%=WebUtility.GetUrl("~/Admin/Service/OrderCrm.aspx")%>'
                            class=""><span>客服下单</span></a></li>

                    </ul>
                </div>
            </div>
            <div class="divfan_leftsider_info_nav" onclick="showContent('1')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img1" />商家管理
            </div>


            <div class="divfan_leftsider_menuContent" id="div1" style="display: none">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>
                        <li class="level2  "><a href="<%=WebUtility.GetUrl("~/Admin/Shop/ShopDetail.aspx")%>"
                            id="A1"><span>新增商家</span></a></li>
                        <li class="  level2"><a href="<%=WebUtility.GetUrl("~/admin/Shop/ShopList.aspx")%>"
                            id="A1"><span>商家列表</span></a></li>

                        <li class="  level2"><a href="<%=WebUtility.GetUrl("~/admin/Shop/shopdatalist.aspx")%>"
                            id="A1"><span>商家分类</span></a></li>
                        <li class="  level2"><a href="<%=WebUtility.GetUrl("~/Admin/Shop/piclist.aspx")%>"><span>商家标签</span></a></li>


                        <li class=" level1" style="display: none;"><a href='<%=WebUtility.GetUrl("~/Admin/Shop/feerule.aspx")%>'
                            class=""><span>产值对比</span></a></li>
                        <li class="last  level2"><a href="<%=WebUtility.GetUrl("~/Admin/Shop/delShopList.aspx")%>"
                            id="A1"><span>商家回收站</span></a></li>



                    </ul>
                </div>
            </div>


            <div class="divfan_leftsider_info_nav" onclick="showContent('9')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img9" />会员管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div9" style="display: none">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>

                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/User/UserList.aspx")%>">会员管理</a>
                            </div>
                        </li>

                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/admin/user/SMSmarketing.aspx")%>'
                            class=""><span>短信营销</span></a></li>


                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/Admin/User/UserAddMoneyLog.aspx")%>'
                            class=""><span>充值记录</span></a></li>
                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/Admin/User/UserDelMoneyLog.aspx")%>'
                            class=""><span>消费记录</span></a></li>
                        <li class="level1"><a href='<%=WebUtility.GetUrl("~/Admin/user/pointrecordlist.aspx")%>'
                            class=""><span>积分记录</span></a></li>


                    </ul>
                </div>
            </div>


            <div class="divfan_leftsider_info_nav" onclick="showContent('5')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img5" />配送员管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div5" style="display: none">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>
                        <li class="level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/DeliverDetail.aspx")%>'
                            class=""><span>添加配送员</span></a></li>

                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/DeliverList.aspx")%>'
                            class=""><span>配送员管理</span></a></li>


                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/DeliverGroupList.aspx")%>'
                            class=""><span>配送员群组管理</span></a></li>

                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/attendancelist.aspx")%>'
                            class=""><span>配送员考勤记录</span></a></li>

                        <li class="level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/Deliveroploglist.aspx")%>'
                            class=""><span>配送员操作日志</span></a></li>


                        <li class="level1"><a href='<%=WebUtility.GetUrl("~/admin/manage/delDeliverList.aspx")%>'
                            class=""><span>配送员回收站</span></a></li>
                        <li class="last level1"><a href='<%=WebUtility.GetUrl("~/Admin/Service/locationmonitor.aspx")%>'
                            class=""><span>查看商家配送员位置</span></a></li>

                    </ul>
                </div>
            </div>



            <div class="divfan_leftsider_info_nav" onclick="showContent('4')" id="left_head7">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img4" />权限管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div4" style="display: none;">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>
                        <li><a href="<%=WebUtility.GetUrl("~/Admin/Permission/AdminList.aspx")%>">用户管理</a>
                        </li>
                        <%--   <li><a href="<%=WebUtility.GetUrl("~/Admin/Permission/Modulelist.aspx")%>">模块管理</a>
                        </li>
                        <li><a href="<%=WebUtility.GetUrl("~/Admin/Permission/moduledetail.aspx")%>">添加模块</a>
                        </li>--%>
                        <li><a href="<%=WebUtility.GetUrl("~/Admin/Permission/rolelist.aspx")%>">角色管理</a>
                        </li>
                    </ul>
                </div>
            </div>



            <div class="divfan_leftsider_info_nav" onclick="showContent('6')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16"
                    height="16" id="img6" />财务管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div6" style="display: none;">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>

                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/ShopData/deliversettle.aspx") %>'
                            class=""><span>配送员收款</span></a></li>


                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/ShopData/commpanycash.aspx") %>'
                            class=""><span>公司财务收款</span></a></li>



                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/ShopData/UserAddMoneyLog.aspx")%>'
                            class=""><span>费用明细</span></a> </li>


                        <li class="level1"><a href='<%=WebUtility.GetUrl("~/admin/ShopData/UserAddMoneyLog.aspx?delflag=1")%>'
                            class=""><span>费用明细回收站</span></a></li>





                        <li style="display: none;">
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/ShopData/UserAddMoneyDetail.aspx")%>">公司分站收款</a>
                            </div>

                        </li>


                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/ShopData/shopnosettle.aspx")%>">未结算商家</a>
                            </div>

                        </li>




                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/ShopData/shopsettle.aspx")%>">商家对账</a>
                            </div>

                        </li>

                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/ShopData/weixordershopsettle.aspx")%>">商家对账(微信订单)</a>
                            </div>

                        </li>


                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/ShopData/Deliversarly.aspx")%>">配送员薪资结算</a>
                            </div>
                        </li>







                    </ul>
                </div>
            </div>
            <div class="divfan_leftsider_info_nav" onclick="showContent('7')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16"
                    height="16" id="img7" />数据分析
            </div>
            <div class="divfan_leftsider_menuContent" id="div7" style="display: none;">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>
                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/DeliverOutputValue.aspx")%>'
                            class=""><span>产值对比</span></a></li>


                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/admin/DataAnalysis/Deliverordersum.aspx")%>'
                            class=""><span>配送员统计</span></a></li>



                        <li class=" level1 last"><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/shopordersum.aspx") %>'
                            class=""><span>商家统计</span></a></li>

                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/marketadminsum.aspx") %>'
                            class=""><span>市场部统计</span></a></li>



                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/groupordersum.aspx") %>'
                            class=""><span>分站统计</span></a></li>

                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/cityordersum.aspx") %>'
                            class=""><span>城市统计</span></a></li>


                        <li class=" level1 "><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/damageRecordSum.aspx") %>'
                            class=""><span>损单统计</span></a></li>





                        <li class=" level1">
                            <a href="<%=WebUtility.GetUrl("~/Admin/DataAnalysis/webStatisticsYear.aspx")%>">订单统计</a>
                        </li>



                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/shopTOP10.aspx")%>'
                            class=""><span>商家销量TOP10</span></a></li>


                        <li class=" level1"><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/timeorder.aspx")%>'
                            class=""><span>订单时间分布</span></a></li>

                        <li class="last level1"><a href='<%=WebUtility.GetUrl("~/Admin/DataAnalysis/ordersource.aspx")%>'
                            class=""><span>订单来源分布</span></a></li>

                    </ul>
                </div>
            </div>

            <div class="divfan_leftsider_info_nav" onclick="showContent('8')">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16"
                    height="16" id="img8" />物料管理
            </div>
            <div class="divfan_leftsider_menuContent" id="div8" style="display: none;">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>
                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/deviceList.aspx")%>'
                            class=""><span>物料管理</span></a> </li>

                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/inStorageorder.aspx")%>'
                            class=""><span>物料入库</span></a> </li>

                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/outStorageorder.aspx")%>'
                            class=""><span>物料出库</span></a> </li>
                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/shopdatalist_brand.aspx")%>'
                            class=""><span>物料分类管理</span></a> </li>
                        <li class="   level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/freehiftslist.aspx") %>'
                            class=""><span>物料单位管理</span></a></li>
                        <li class="last  level1"><a href='<%=WebUtility.GetUrl("~/Admin/device/devicespan.aspx")%>'
                            class=""><span>物料分布</span></a></li>

                    </ul>
                </div>
            </div>

            <div class="divfan_leftsider_info_nav" onclick="showContent('3')" id="left_head6">
                <img src="<%=WebUtility.GetUrl("~/Admin/images/jiahao.jpg")%>" width="16" height="16"
                    id="img3" />网站参数设置
            </div>
            <div class="divfan_leftsider_menuContent" id="div3" style="display: none">
                <div class="divfan_leftsider_menuContent_nav">
                </div>
                <div class="divfan_leftsider_ul">
                    <ul>


                        <li class="   level1"><a href="<%=WebUtility.GetUrl("~/admin/manage/setweixin.aspx")%>"
                            id="A9"><span>微信公众平台帐号</span></a></li>

                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/manage/citylist.aspx")%>">城市管理</a>
                            </div>
                        </li>

                        <li class="   level1"><a href="<%=WebUtility.GetUrl("~/admin/manage/promotionshareconfig.aspx")%>"
                            id="A9"><span>分享促销配置</span></a></li>


                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/manage/PptList.aspx")%>'
                            class=""><span>幻灯片管理</span></a></li>
                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/manage/shoprechargeconfig.aspx?")%>'
                            class=""><span>商家充值配置</span></a> </li>


                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/manage/STemplatelist.aspx?id=1")%>'
                            class=""><span>商家发单备注管理</span></a> </li>


                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/manage/sysaccounts.aspx")%>">费用科目管理</a>
                            </div>
                        </li>



                        <li class="  level1"><a href='<%=WebUtility.GetUrl("~/Admin/manage/webaccounts.aspx")%>'
                            class=""><span>账户管理</span></a> </li>



                        <li>
                            <div class="">
                                <a href="<%=WebUtility.GetUrl("~/Admin/manage/WebBasic.aspx")%>">系统设置</a>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>


        </div>
    </div>
    <div title="开启或关闭侧边栏" id="leftToggler" style="height: 226px; display: none" onclick="showleft()">
        &nbsp;
    </div>
</div>
